<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/rp/common/taglib.jsp" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <base href="<%=basePath%>">
    
    <title>${ webpageTitle }</title>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
	
	<script src="rp/scripts/boot.js" type="text/javascript"></script>
	
	<style type="text/css">
	   	
    </style>
	
  </head>
  
  <body class="body-p5">
  	
  	<div id="form1">
  		<input name="userId" class="mini-hidden" value="${ userId }"/>
  		<table>
  			<tr>
  				<td>
  					<label>原密码：</label>
  				</td>
  				<td>
  					<input name="originalPwd" class="mini-password" required="true" />
  				</td>
  			</tr>
  			<tr>
  				<td>
  					<label>新密码：</label>
  				</td>
  				<td>
  					<input name="newPwd" class="mini-password" required="true" />
  				</td>
  			</tr>
  			<tr>
  				<td>
  					<label>密码确认：</label>
  				</td>
  				<td>
  					<input name="newPwd2" class="mini-password" required="true" />
  				</td>
  			</tr>
  			<tr>
  				<td></td>
  				<td>
  					<a class="mini-button" onclick="submitForm()">
  					<i class="fa fa-floppy-o fa-lg"></i> 保存</a>
  				</td>
  			</tr>
  		</table>
  	
  	</div>
  	
	<script type="text/javascript">
		$(function(){
			
		});
		
		function submitForm(){
			var form = new mini.Form("#form1");
            form.validate();
            if (form.isValid() == false) return;
            
            //提交数据
            var data = form.getData();      
            var json = mini.encode(data);
            rp_ajax("rp/system/userMng/changePwd", {json: json}, function(text){
            	mini.alert(text);
            });
		}
	</script>
  </body>
</html>
